<!DOCTYPE html>
<html>

<head>
	<%- include('meta.html') %>
	<meta name="keywords" content="<%=site.keywords%>" />
	<meta name="description" content="<%=site.description%>" />
	<link rel="stylesheet" type="text/css" href="<%=base_url%>/h5/css/mkui.css" />
	<link rel="stylesheet" type="text/css" href="<%=base_url%>/h5/css/index.css" />
	<link rel="stylesheet" type="text/css" href="<%=base_url%>/h5/css/list.css" />
	<title><%=site.name%></title>
</head>

<body>

	<%- include('head.html') %>

	<!-- 当前位置 -->
	<section class="pd-15 f-14 c-333 position">
		<a href="/">首页</a>
		<%position.forEach(item=>{%>
		&gt; <a href="/list/<%=item.id%>"><%=item.name%></a>
		<%})%>
	</section>

	<div class="mb-20 overflow-h">
		<ul>
			<%list.list.forEach(item=>{%>
			<li class="flex border-b pd-10">
				<%if(item.img){%>
				<figure class="mt-6">
					<img class="list-img" lazyload="on" src="<%=item.img%>">
				</figure>
				<%}%>
				<div class="ml-10 flex-1">
					<h3 class="f-14 mt-8 mb-8 flex flex-between">
						<a class="c-333 ellips-1" href="/article/<%=item.id%>"><%=item.title%></a>
				</h3>
				<p class="f-12 c-999 ellips-2">
					<a href="/article/<%=item.id%>"><%=item.description.slice(0,50)%></a></p>
	</div>
	</li>
	<%})%>

	<ul>
		</div>


		<!-- page -->
		<div class="page mb-20">
			<ul class="overflow-h" id="page">
			</ul>
		</div>

		<!-- ad -->
		<div class="mb-20 flex flex-c space-c">
			<img src=" <%=ad.heci.imgUrl%>" alt="">
		</div>


		<script src="https://cdn.bootcss.com/vue/2.6.10/vue.min.js"></script>
		<script src="<%=base_url%>/pc/js/search.js"></script>
		<%if(list.total>1){%>
		<script src="//code.jquery.com/jquery-2.2.4.min.js"
			integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>
		<script src="<%=base_url%>/pc/js/jquery.page.js"></script>
		<script>
			console.log('position----->', '<%-JSON.stringify(position)%>')
			var pageNo = getParams('page');
			if (pageNo <= 0) {
				pageNo = 1;
			}
			Page({
				num: parseInt('<%=list.total==0?1:list.total%>'),	//页码数
				startnum: pageNo,//指定页码
				elem: $('#page'),//指定的元素
				callback: function (n) {	//回调函数
					location.href = location.pathname + "?page=" + n
				}
			});
		</script>
		<%}%>

</body>

</html>